Ext.define('MyApp.view.navigation.ToolbarMenuAddForm', {
	extend: 'Ext.window.Window',
	alias: 'widget.toolbarMenuAddForm',
	initComponent: function(){
		Ext.apply(this, {
			//layout: 'fit',
			layout: 'column',
			autoScroll: true,
			modal: true,//遮盖
			title : '增加新按钮',
			maximizable: true,//最大化
			//minimizable: true,//最小化
			resizable: false,
			items: [{
				xtype: 'form',
				bodyPadding: 10,//内边距
				fieldDefaults: {
					allowBlank: false,//不允许为空
					anchor: '100%',
					afterLabelTextTpl: Ext.myUtil.required,
					labelAlign: 'right',//标签在右边
					labelWidth: 120//标签长度，
					
				},
				items: [{
						xtype: 'textfield',
						name: 'itemId',
						emptyText : '输入按钮标示,不能为空',
						fieldLabel: '按钮标示'
					},{
						xtype: 'textfield',
						name: 'text',
						fieldLabel: '按钮名称'
					},{
						xtype: 'combobox',
						name: 'glyph',
						store: Ext.create('MyApp.store.GlyphStore'),
						valueField: 'glyph',
		                displayField: 'description',
						fieldLabel: '按钮图标'
					},{
						xtype: 'combobox',
						name: 'authorityid',
						queryParam:'navigationid',
						valueField: 'id',
						//forceSelection: true,
		                displayField: 'authorityDescription',
						fieldLabel: '对应权限'
					},{
						xtype:'radiogroup',
						fieldLabel : '初始不可以',
						vertical: true,
            			items: [{
		                    boxLabel  : '是',
		                    name      : 'disabled',
		                    inputValue: true
		                },{
		                    boxLabel  : '否',
		                    name      : 'disabled',
		                    checked:true,
		                    inputValue: false
		                }]
					},{
						xtype: 'numberfield',
						name: 'seq',
						fieldLabel: '序号',
						value: 1,
		                minValue: 1
					}
				]
			}],
			buttonAlign: 'center',
			buttons: [{
				text: '保存',
				itemId: 'save',
				glyph:0xf0c7
			},{
				text: '取消',
				itemId: 'cancel',
				glyph:0xf00d
			}]
		});
		this.callParent(arguments);
	}
});